''''''

# Standard
# Related
import lx
# Local


_eval = lx.eval

def get_symmetry_state():
    '''Return the symmetry state currently in modo.'''
    
    state = _eval('select.symmetryState ?')
    
    if state == 'none':
        return None
    else:
        return state

def set_symmetry_state(state):
    '''Set the symmetry state. Note that to set symmetry "off", use the None
    value as the state.
    
    @todo: Add a proper failure.
    '''
    
    accepted_states = ['x', 'y', 'z', None]
    
    if state not in accepted_states:
        raise NotImplementedError()
    
    return _eval('select.symmetryState %s' % state)